<template>
<view>
<!-- 详细机况弹窗 -->
<view class="mach_det" v-if="show_det!=0">
	<view class="mach_tit_box">
		<view class="m_ba_butt">
			<label @tap="canlce_det">返回</label>
		</view>
		<view class="mach_tit">机况详细描述表</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">驾驶室</view>
		<view class="mci_cont">
			<view>
				<label>是否有碰撞：</label>
				<label :class="'lab_item ' + (carInfo.cab_worn==0?'lai_cor':'')" data-name="cab_worn" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.cab_worn==1?'lai_cor':'')" data-name="cab_worn" data-id="1" @tap="click_item">轻微</label>
				<label :class="'lab_item ' + (carInfo.cab_worn==2?'lai_cor':'')" data-name="cab_worn" data-id="2" @tap="click_item">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">电动油门</view>
		<view class="mci_cont">
			<view>
				<label>是否正常：</label>
				<label :class="'lab_item ' + (carInfo.ele_gac==0?'lai_cor':'')" data-name="ele_gac" data-id="0" @tap="click_item">正常</label>
				<label :class="'lab_item ' + (carInfo.ele_gac==1?'lai_cor':'')" data-name="ele_gac" data-id="1" @tap="click_item">手拉</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">发动机是否有废气</view>
		<view class="mci_cont">
			<view>
				<label>上排气：</label>
				<label :class="'lab_item ' + (carInfo.enginewaste_on==0?'lai_cor':'')" data-name="enginewaste_on" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.enginewaste_on==1?'lai_cor':'')" data-name="enginewaste_on" data-id="1" @tap="click_item">轻微</label>
				<label :class="'lab_item ' + (carInfo.enginewaste_on==2?'lai_cor':'')" data-name="enginewaste_on" data-id="2" @tap="click_item">有</label>
			</view>
			<view>
				<label>下排气：</label>
				<label :class="'lab_item ' + (carInfo.enginewaste_down==0?'lai_cor':'')" data-name="enginewaste_down" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.enginewaste_down==1?'lai_cor':'')" data-name="enginewaste_down" data-id="1" @tap="click_item">轻微</label>
				<label :class="'lab_item ' + (carInfo.enginewaste_down==2?'lai_cor':'')" data-name="enginewaste_down" data-id="2" @tap="click_item">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">挂臂情况</view>
		<view class="mci_cont">
			<view>
				<label>大臂：</label>
				<label :class="'lab_item ' + (carInfo.fallarm_b==0?'lai_cor':'')" data-name="fallarm_b" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.fallarm_b==1?'lai_cor':'')" data-name="fallarm_b" data-id="1" @tap="click_item">轻微</label>
				<label :class="'lab_item ' + (carInfo.fallarm_b==2?'lai_cor':'')" data-name="fallarm_b" data-id="2" @tap="click_item">有</label>
			</view>
			<view>
				<label>小臂：</label>
				<label :class="'lab_item ' + (carInfo.fallarm_s==0?'lai_cor':'')" data-name="fallarm_s" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.fallarm_s==1?'lai_cor':'')" data-name="fallarm_s" data-id="1" @tap="click_item">轻微</label>
				<label :class="'lab_item ' + (carInfo.fallarm_s==2?'lai_cor':'')" data-name="fallarm_s" data-id="2" @tap="click_item">有</label>
			</view>
			<view>
				<label>铲斗：</label>
				<label :class="'lab_item ' + (carInfo.fallarm_c==0?'lai_cor':'')" data-name="fallarm_c" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.fallarm_c==1?'lai_cor':'')" data-name="fallarm_c" data-id="1" @tap="click_item">轻微</label>
				<label :class="'lab_item ' + (carInfo.fallarm_c==2?'lai_cor':'')" data-name="fallarm_c" data-id="2" @tap="click_item">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">转盘间隙情况</view>
		<view class="mci_cont">
			<view>
				<label>上下间隙：</label>
				<label :class="'lab_item ' + (carInfo.tablegap_sx==0?'lai_cor':'')" data-name="tablegap_sx" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.tablegap_sx==1?'lai_cor':'')" data-name="tablegap_sx" data-id="1" @tap="click_item">轻微</label>
				<label :class="'lab_item ' + (carInfo.tablegap_sx==2?'lai_cor':'')" data-name="tablegap_sx" data-id="2" @tap="click_item">有</label>
			</view>
			<view>
				<label>左右间隙：</label>
				<label :class="'lab_item ' + (carInfo.tablegap_zy==0?'lai_cor':'')" data-name="tablegap_zy" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.tablegap_zy==1?'lai_cor':'')" data-name="tablegap_zy" data-id="1" @tap="click_item">轻微</label>
				<label :class="'lab_item ' + (carInfo.tablegap_zy==2?'lai_cor':'')" data-name="tablegap_zy" data-id="2" @tap="click_item">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">怠速撑车情况</view>
		<view class="mci_cont">
			<view>
				<label>是否能撑车：</label>
				<label :class="'lab_item ' + (carInfo.brace_car==0?'lai_cor':'')" data-name="brace_car" data-id="0" @tap="click_item">正常</label>
				<label :class="'lab_item ' + (carInfo.brace_car==1?'lai_cor':'')" data-name="brace_car" data-id="1" @tap="click_item">撑不完全</label>
				<label :class="'lab_item ' + (carInfo.brace_car==2?'lai_cor':'')" data-name="brace_car" data-id="2" @tap="click_item">撑不起</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">单边行走情况</view>
		<view class="mci_cont">
			<view>
				<label>左边</label>
				<label :class="'lab_item ' + (carInfo.onewalk_z==0?'lai_cor':'')" data-name="onewalk_z" data-id="0" @tap="click_item">正常</label>
				<label :class="'lab_item ' + (carInfo.onewalk_z==1?'lai_cor':'')" data-name="onewalk_z" data-id="1" @tap="click_item">慢</label>
				<label :class="'lab_item ' + (carInfo.onewalk_z==2?'lai_cor':'')" data-name="onewalk_z" data-id="2" @tap="click_item">走不动</label>
			</view>
			<view>
				<label>右边</label>
				<label :class="'lab_item ' + (carInfo.onewalk_y==0?'lai_cor':'')" data-name="onewalk_y" data-id="0" @tap="click_item">正常</label>
				<label :class="'lab_item ' + (carInfo.onewalk_y==1?'lai_cor':'')" data-name="onewalk_y" data-id="1" @tap="click_item">慢</label>
				<label :class="'lab_item ' + (carInfo.onewalk_y==2?'lai_cor':'')" data-name="onewalk_y" data-id="2" @tap="click_item">走不动</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">行走时减速是否异常</view>
		<view class="mci_cont">
			<view>
				<label>左边</label>
				<label :class="'lab_item ' + (carInfo.walkslow_z==0?'lai_cor':'')" data-name="walkslow_z" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.walkslow_z==1?'lai_cor':'')" data-name="walkslow_z" data-id="1" @tap="click_item">有</label>
			</view>
			<view>
				<label>右边</label>
				<label :class="'lab_item ' + (carInfo.walkslow_y==0?'lai_cor':'')" data-name="walkslow_y" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.walkslow_y==1?'lai_cor':'')" data-name="walkslow_y" data-id="1" @tap="click_item">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">怠速憋车情况</view>
		<view class="mci_cont">
			<view>
				<label>是否正常：</label>
				<label :class="'lab_item ' + (carInfo.idling_holdcar==0?'lai_cor':'')" data-name="idling_holdcar" data-id="0" @tap="click_item">正常</label>
				<label :class="'lab_item ' + (carInfo.idling_holdcar==1?'lai_cor':'')" data-name="idling_holdcar" data-id="1" @tap="click_item">有烟</label>
				<label :class="'lab_item ' + (carInfo.idling_holdcar==2?'lai_cor':'')" data-name="idling_holdcar" data-id="2" @tap="click_item">熄火</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">憋车发动机烟量</view>
		<view class="mci_cont">
			<view>
				<label>大油门：</label>
				<label :class="'lab_item ' + (carInfo.holdsmoke_b==0?'lai_cor':'')" data-name="holdsmoke_b" data-id="0" @tap="click_item">正常</label>
				<label :class="'lab_item ' + (carInfo.holdsmoke_b==1?'lai_cor':'')" data-name="holdsmoke_b" data-id="1" @tap="click_item">量小</label>
				<label :class="'lab_item ' + (carInfo.holdsmoke_b==2?'lai_cor':'')" data-name="holdsmoke_b" data-id="2" @tap="click_item">量大</label>
			</view>
			<view>
				<label>小油门：</label>
				<label :class="'lab_item ' + (carInfo.holdsmoke_s==0?'lai_cor':'')" data-name="holdsmoke_s" data-id="0" @tap="click_item">正常</label>
				<label :class="'lab_item ' + (carInfo.holdsmoke_s==1?'lai_cor':'')" data-name="holdsmoke_s" data-id="1" @tap="click_item">量小</label>
				<label :class="'lab_item ' + (carInfo.holdsmoke_s==2?'lai_cor':'')" data-name="holdsmoke_s" data-id="2" @tap="click_item">量大</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">设备速度情况</view>
		<view class="mci_cont">
			<view>
				<label>是否正常：</label>
				<label :class="'lab_item ' + (carInfo.device_speed==0?'lai_cor':'')" data-name="device_speed" data-id="0" @tap="click_item">快</label>
				<label :class="'lab_item ' + (carInfo.device_speed==1?'lai_cor':'')" data-name="device_speed" data-id="1" @tap="click_item">慢</label>
				<label :class="'lab_item ' + (carInfo.device_speed==2?'lai_cor':'')" data-name="device_speed" data-id="2" @tap="click_item">无动作</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">开裂情况</view>
		<view class="mci_cont">
			<view>
				<label>大臂：</label>
				<label :class="'lab_item ' + (carInfo.crack_b==0?'lai_cor':'')" data-name="crack_b" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.crack_b==1?'lai_cor':'')" data-name="crack_b" data-id="1" @tap="click_item">有</label>
			</view>
			<view>
				<label>小臂：</label>
				<label :class="'lab_item ' + (carInfo.crack_s==0?'lai_cor':'')" data-name="crack_s" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.crack_s==1?'lai_cor':'')" data-name="crack_s" data-id="1" @tap="click_item">有</label>
			</view>
			<view>
				<label>铲斗：</label>
				<label :class="'lab_item ' + (carInfo.crack_c==0?'lai_cor':'')" data-name="crack_c" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.crack_c==1?'lai_cor':'')" data-name="crack_c" data-id="1" @tap="click_item">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">设备运行大件是否有异响</view>
		<view class="mci_cont">
			<view>
				<label>发动机：</label>
				<label :class="'lab_item ' + (carInfo.runbig_fdj==0?'lai_cor':'')" data-name="runbig_fdj" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.runbig_fdj==1?'lai_cor':'')" data-name="runbig_fdj" data-id="1" @tap="click_item">有</label>
			</view>
			<view>
				<label>主阀：</label>
				<label :class="'lab_item ' + (carInfo.runbig_zf==0?'lai_cor':'')" data-name="runbig_zf" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.runbig_zf==1?'lai_cor':'')" data-name="runbig_zf" data-id="1" @tap="click_item">有</label>
			</view>
			<view>
				<label>回转马达：</label>
				<label :class="'lab_item ' + (carInfo.runbig_hzmd==0?'lai_cor':'')" data-name="runbig_hzmd" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.runbig_hzmd==1?'lai_cor':'')" data-name="runbig_hzmd" data-id="1" @tap="click_item">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">链轨链桶情况</view>
		<view class="mci_cont">
			<view>
				<label>左链接</label>
				<label :class="'lab_item ' + (carInfo.chain_z==0?'lai_cor':'')" data-name="chain_z" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.chain_z==1?'lai_cor':'')" data-name="chain_z" data-id="1" @tap="click_item">有</label>
			</view>
			<view>
				<label>右链接</label>
				<label :class="'lab_item ' + (carInfo.chain_y==0?'lai_cor':'')" data-name="chain_y" data-id="0" @tap="click_item">无</label>
				<label :class="'lab_item ' + (carInfo.chain_y==1?'lai_cor':'')" data-name="chain_y" data-id="1" @tap="click_item">有</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">X架情况</view>
		<view class="mci_cont">
			<view>
				<label>是否正常：</label>
				<label :class="'lab_item ' + (carInfo.x_frame==0?'lai_cor':'')" data-name="x_frame" data-id="0" @tap="click_item">正常</label>
				<label :class="'lab_item ' + (carInfo.x_frame==1?'lai_cor':'')" data-name="x_frame" data-id="1" @tap="click_item">有开裂</label>
				<label :class="'lab_item ' + (carInfo.x_frame==2?'lai_cor':'')" data-name="x_frame" data-id="2" @tap="click_item">需更换</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">锤及管路</view>
		<view class="mci_cont">
			<view>
				<label>锤：</label>
				<label :class="'lab_item ' + (carInfo.mace==0?'lai_cor':'')" data-name="mace" data-id="0" @tap="click_item">带</label>
				<label :class="'lab_item ' + (carInfo.mace==1?'lai_cor':'')" data-name="mace" data-id="1" @tap="click_item">需拆</label>
				<label :class="'lab_item ' + (carInfo.mace==2?'lai_cor':'')" data-name="mace" data-id="2" @tap="click_item">无</label>
			</view>
			<view>
				<label>管路：</label>
				<label :class="'lab_item ' + (carInfo.tube==0?'lai_cor':'')" data-name="tube" data-id="0" @tap="click_item">带</label>
				<label :class="'lab_item ' + (carInfo.tube==1?'lai_cor':'')" data-name="tube" data-id="1" @tap="click_item">需拆</label>
				<label :class="'lab_item ' + (carInfo.tube==2?'lai_cor':'')" data-name="tube" data-id="2" @tap="click_item">无</label>
			</view>
		</view>
	</view>
	<view class="mach_item">
		<view class="mci_tit">手续情况</view>
		<view class="mci_cont">
			<view>
				<label>发票：</label>
				<label :class="'lab_item ' + (carInfo.routine_fp==0?'lai_cor':'')" data-name="routine_fp" data-id="0" @tap="click_item">有</label>
				<label :class="'lab_item ' + (carInfo.routine_fp==1?'lai_cor':'')" data-name="routine_fp" data-id="1" @tap="click_item">无</label>
			</view>
			<view>
				<label>合格证：</label>
				<label :class="'lab_item ' + (carInfo.routine_hgz==0?'lai_cor':'')" data-name="routine_hgz" data-id="0" @tap="click_item">有</label>
				<label :class="'lab_item ' + (carInfo.routine_hgz==1?'lai_cor':'')" data-name="routine_hgz" data-id="1" @tap="click_item">无</label>
			</view>
		</view>
	</view>
	<view class="mach_butt">
		<button class="mc_bu" @tap="canlce_det">确定</button>
	</view>
</view>
<view class="s_top_box">修改{{selectclass}}信息</view>
<block v-if="cardetail.class==46">
	<form @reset="formReset" @submit="release" reportSubmit="true">
		<!-- <view class="modle">
			车辆类型
			<text class="must_red">*</text>
			<picker bindchange="selectclass" class="modle_right" range="{{classes}}" rangeKey="name" value="{{index}}">
				<view>
					{{selectclass}}
				</view>
			</picker>
		</view> -->
		<view @tap="selectbrandFun" class="modle" style="display:none;">
			车辆品牌
			<text class="must_red">*</text>
			<view class="modle_right">

				{{selectbrand}}

			</view>
		</view>
		<view class="modle" style="display:none;">
			生产日期
			<text class="must_red">*</text>
			<picker @change="bindDateChange" class="modle_right" fields="month" mode="date" :value="date">
				<view>
					{{selecttime}}
				</view>
			</picker>
		</view>
		<view class="modle">
			购买日期
			<text class="must_red">*</text>
			<picker @change="bindDateChange1" class="modle_right" fields="month" mode="date" :value="date">
				<view>
					{{buydate}}
				</view>
			</picker>
		</view>
		<view class="modle" style="display:none;">
			出厂年份
			<text class="must_red">*</text>
			<picker @change="vehicletimeFun" class="modle_right" fields="day" mode="date" :value="date">
				<view>
					{{vehicletime}}
				</view>
			</picker>
		</view>
		<view class="modle" style="display:none;">
			保险到期时间
			<text class="must_red">*</text>
			<picker @change="insuranceFun" class="modle_right" fields="day" mode="date" :value="date">
				<view>
					{{insurance}}
				</view>
			</picker>
		</view>
		<view class="modle">
			汽车名称
			<text class="must_red">*</text>
			<input class="modle_right" name="carname" placeholder="请输入汽车名称" placeholderStyle="color: #9295A8;" type="text" :value="cardetail.name">
		</view>
		<view class="modle" style="display:none;">
			工作时长（小时）
			<text class="must_red">*</text>
			<input class="modle_right" name="work_hours" placeholder="请输入工作时长" placeholderStyle="color: #9295A8;" type="text" :value="cardetail.work_hours">
		</view>
		<view class="modle" style="display:none;">
			重量（吨）
			<text class="must_red">*</text>
			<input class="modle_right" name="weight" placeholder="请输入重量" placeholderStyle="color: #9295A8;" type="text" :value="cardetail.weight">
		</view>
		<view class="modle" style="display:none;">
			出厂年限（年）
			<text class="must_red">*</text>
			<input class="modle_right" name="agelimit" placeholder="请输入出厂年限" placeholderStyle="color: #9295A8;" type="text" :value="cardetail.agelimit">
		</view>
		<!-- <view class="modle">
			公里数(单位万)
			<text class="must_red">*</text>
			<input class="modle_right" name="kilometre" placeholder="请输入公里数" placeholderStyle="color: #9295A8;" type="text" value="{{cardetail.km}}"></input>
		</view> -->
		<view class="modle">
			价格(单位万)
			<text class="must_red">*</text>
			<input class="modle_right" name="price" placeholder="请输入转让价格单位：万" placeholderStyle="color: #9295A8;" type="text" :value="cardetail.price">
		</view>
		<view class="modle">
			排气量
			<text class="must_red">*</text>
			<input class="modle_right" name="exhaust" placeholder="请输入排气量（如：1.6）" placeholderStyle="color: #9295A8;" style="width:300rpx;" type="text" :value="cardetail.exhaust">
		</view>
		<view class="modle">
			变速箱
			<text class="must_red">*</text>
			<picker @change="gearbox" class="modle_right" mode="selector" :range="gearboxes" rangeKey="name" :value="index">
				<view>
					{{gearboxname}}
				</view>
			</picker>
		</view>
		<view class="modle" style="display:none;">
			是否有发票、合格证
			<view class="f_h_box">
				<view class="fh_item">
					<view class="fh_img" @tap="choose_fp">
						<block v-if="has_invoice==1">
							<image mode="aspectFill" src="/static/pages/image/xuanze_btn.png"></image>
						</block>

						<block v-if="has_invoice==0">
							<image mode="aspectFill" src="/static/pages/image/weixuanze_btn.png"></image>
						</block>
					</view>
					<view class="fh_word">发票</view>
				</view>
				<view class="fh_item">
					<view class="fh_img" @tap="choose_hgz">
						<block v-if="has_certificate==1">
							<image mode="aspectFill" src="/static/pages/image/xuanze_btn.png"></image>
						</block>

						<block v-if="has_certificate==0">
							<image mode="aspectFill" src="/static/pages/image/weixuanze_btn.png"></image>
						</block>
					</view>
					<view class="fh_word">合格证</view>
				</view>
			</view>
			<!-- 标签（，隔开）
			<text class="must_red">*</text>
			<input class="modle_right" name="labstr" placeholder="请输入标签" placeholderStyle="color: #9295A8;" type="text" value="{{cardetail.label}}"></input> -->
		</view>
		<view class="modle">
			车主姓名
			<text class="must_red">*</text>
			<input class="modle_right" name="relname" placeholder="请输入车主姓名" placeholderStyle="color: #9295A8;" type="text" :value="cardetail.relname">
		</view>
		<view class="modle" style="display:none;">
			看车地点
			<text class="must_red">*</text>
			<input class="modle_right" name="watchcar" placeholder="请输入看车地点（如：北京）" placeholderStyle="color: #9295A8;" style="width:320rpx;" type="text" :value="cardetail.watchcar">
		</view>
		<view class="modle">
			联系电话
			<text class="must_red">*</text>
			<button @getphonenumber="getPhoneNumber" class="modle_btn" open-type="getPhoneNumber">电话授权</button>
			<input class="modle_right" name="phone" placeholder="请输入电话" placeholderStyle="color: #9295A8;" type="number" :value="userphone">
		</view>
		<view class="modle">
			车辆地址
			<text class="must_red">*</text>
			<button @tap="tomap" class="modle_btn">获取位置</button>
			<input class="modle_right" disabled="true" name="address" placeholder placeholderStyle="color: #9295A8;" style="width:350rpx;" type="text" :value="mapname&&mapname.length>2?mapname:''">
		</view>
		<!-- <view class="modle">
			车辆简介
			<input class="modle_right" name="synopsis" placeholder="请输入车辆简介" placeholderStyle="color: #9295A8;" type="text" value="{{cardetail.synopsis}}"></input>
		</view> -->
		<view class="modle" style="display:none">
			机况详情
			<text class="must_red">*</text>
			<text class="modle_right" @tap="toMore">查看详情</text>
		</view>
		<view class="modle" style="border-bottom:0">
			车辆信息
			<button @tap="addcarsimgs" class="modle_btn">添加信息</button>
		</view>
		<view v-for="(item, index) in carsimgs" :key="index">
			<view class="shangchuan_view_border">
				<view class="shangchuan_view" v-if="item.img!=''">
					<image @tap="upthiscarsimgs" class="shangchuan_Img_close" :data-index="index" src="/static/pages/image/tupiangb_btn.png"></image>
					<image class="shangchuan_Img" :src="item.img"></image>
				</view>
				<view class="shangchuan_view" v-if="item.img==''">
					<image @tap="upcarsimgs" class="shangchuan_Img" :data-index="index" src="/static/pages/image/tianjiantp_btn.png"></image>
				</view>
			</view>
			<view class="car_messageView">
				<input @blur="setthisintro" class="car_messageView_input" :data-index="index" disabled="disabled" placeholderStyle="color: #9295A8;" type="text" :value="item.intro">
				<view @tap="delcarsimgs" class="car_messageView_sc" :data-index="index">删除</view>
			</view>
		</view>
		<view class="modle" style="border-bottom:0">
			车辆视频
			<button @tap="chooseVideo" class="modle_btn">更换视频</button>
		</view>
		<view class="vid_box">
			<video :src="cardetail.video1" controls="true" show-fullscreen-btn="true"></video>
		</view>

		<button class="bufa_btn" :disabled="buttscan" form-type="submit">修改</button>
		<view class="jinggao">发布不真实车源，虚报价格，一经核实将做封号处理。</view>
	</form>
</block>
<block v-if="cardetail.class!=46">
	<form @reset="formReset" @submit="release" reportSubmit="true">
		<!-- <view class="modle">
			车辆类型
			<text class="must_red">*</text>
			<picker bindchange="selectclass" class="modle_right" range="{{classes}}" rangeKey="name" value="{{index}}">
				<view>
					{{selectclass}}
				</view>
			</picker>
		</view> -->
		<view @tap="selectbrandFun" class="modle" style="display:none;">
			车辆品牌
			<text class="must_red">*</text>
			<view class="modle_right">

				{{selectbrand}}

			</view>
		</view>
		<view class="modle" style="display:none;">
			生产日期
			<text class="must_red">*</text>
			<picker @change="bindDateChange" class="modle_right" fields="month" mode="date" :value="date">
				<view>
					{{selecttime}}
				</view>
			</picker>
		</view>
		<view class="modle">
			购买日期
			<text class="must_red">*</text>
			<picker @change="bindDateChange1" class="modle_right" fields="month" mode="date" :value="date">
				<view>
					{{buydate}}
				</view>
			</picker>
		</view>
		<view class="modle" style="display:none;">
			出厂年份
			<text class="must_red">*</text>
			<picker @change="vehicletimeFun" class="modle_right" fields="day" mode="date" :value="date">
				<view>
					{{vehicletime}}
				</view>
			</picker>
		</view>
		<view class="modle" style="display:none;">
			保险到期时间
			<text class="must_red">*</text>
			<picker @change="insuranceFun" class="modle_right" fields="day" mode="date" :value="date">
				<view>
					{{insurance}}
				</view>
			</picker>
		</view>
		<view class="modle" style="display:none;">
			品牌型号
			<text class="must_red">*</text>
			<input class="modle_right" name="carname" placeholder="请输入品牌型号" placeholderStyle="color: #9295A8;" type="text" :value="cardetail.name">
		</view>
		<view class="modle" style="display:none;">
			工作时间（小时）
			<text class="must_red">*</text>
			<input class="modle_right" name="work_hours" placeholder="请输入工作时长" placeholderStyle="color: #9295A8;" type="text" :value="cardetail.work_hours">
		</view>
		<view class="modle" style="display:none;">
			重量（吨）
			<text class="must_red">*</text>
			<input class="modle_right" name="weight" placeholder="请输入重量" placeholderStyle="color: #9295A8;" type="text" :value="cardetail.weight">
		</view>
		<view class="modle" style="display:none;">
			出厂年限（年）
			<text class="must_red">*</text>
			<input class="modle_right" name="agelimit" placeholder="请输入出厂年限" placeholderStyle="color: #9295A8;" type="text" :value="cardetail.agelimit">
		</view>
		<!-- <view class="modle">
			公里数(单位万)
			<text class="must_red">*</text>
			<input class="modle_right" name="kilometre" placeholder="请输入公里数" placeholderStyle="color: #9295A8;" type="text" value="{{cardetail.km}}"></input>
		</view> -->
		<view class="modle">
			销售价钱(单位万)
			<text class="must_red">*</text>
			<input class="modle_right" name="price" placeholder="请输入价钱单位：万" placeholderStyle="color: #9295A8;" type="text" :value="cardetail.price">
		</view>
		<!-- <view class="modle">
			排气量
			<text class="must_red">*</text>
			<input class="modle_right" name="exhaust" placeholder="请输入排气量（如：1.6）" placeholderStyle="color: #9295A8;" style="width:300rpx;" type="text" value="{{cardetail.exhaust}}"></input>
		</view>
		<view class="modle">
			变速箱
			<text class="must_red">*</text>
			<picker bindchange="gearbox" class="modle_right" mode="selector" range="{{gearboxes}}" rangeKey="name" value="{{index}}">
				<view>
					{{gearboxname}}
				</view>
			</picker>
		</view> -->
		<view class="modle" style="display:none;">
			是否有发票、合格证
			<view class="f_h_box">
				<view class="fh_item">
					<view class="fh_img" @tap="choose_fp">
						<block v-if="has_invoice==1">
							<image mode="aspectFill" src="/static/pages/image/xuanze_btn.png"></image>
						</block>

						<block v-if="has_invoice==0">
							<image mode="aspectFill" src="/static/pages/image/weixuanze_btn.png"></image>
						</block>
					</view>
					<view class="fh_word">发票</view>
				</view>
				<view class="fh_item">
					<view class="fh_img" @tap="choose_hgz">
						<block v-if="has_certificate==1">
							<image mode="aspectFill" src="/static/pages/image/xuanze_btn.png"></image>
						</block>

						<block v-if="has_certificate==0">
							<image mode="aspectFill" src="/static/pages/image/weixuanze_btn.png"></image>
						</block>
					</view>
					<view class="fh_word">合格证</view>
				</view>
			</view>
			<!-- <text class="must_red">*</text>
			<input class="modle_right" name="labstr" placeholder="请输入标签" placeholderStyle="color: #9295A8;" type="text" value="{{cardetail.label}}"></input> -->
		</view>
		<view class="modle">
			机主姓名
			<text class="must_red">*</text>
			<input class="modle_right" name="relname" placeholder="请输入机主姓名" placeholderStyle="color: #9295A8;" type="text" :value="cardetail.relname">
		</view>
		<view class="modle" style="display:none;">
			看车地点
			<text class="must_red">*</text>
			<input class="modle_right" name="watchcar" placeholder="请输入看车地点（如：北京）" placeholderStyle="color: #9295A8;" style="width:320rpx;" type="text" :value="cardetail.watchcar">
		</view>
		<view class="modle">
			联系电话
			<text class="must_red">*</text>
			<button @getphonenumber="getPhoneNumber" class="modle_btn" open-type="getPhoneNumber">电话授权</button>
			<input class="modle_right" name="phone" placeholder="请输入电话" placeholderStyle="color: #9295A8;" type="number" :value="userphone">
		</view>
		<view class="modle">
			车辆地址
			<text class="must_red">*</text>
			<button @tap="tomap" class="modle_btn">获取位置</button>
			<input class="modle_right" disabled="true" name="address" placeholder placeholderStyle="color: #9295A8;" style="width:350rpx;" type="text" :value="mapname&&mapname.length>2?mapname:''">
		</view>
		<!-- <view class="modle">
			车辆简介
			<input class="modle_right" name="synopsis" placeholder="请输入车辆简介" placeholderStyle="color: #9295A8;" type="text" value="{{cardetail.synopsis}}"></input>
		</view> -->
		<view class="modle" style="display:none;">
			机况详情
			<text class="must_red">*</text>
			<text class="modle_right" @tap="toMore">查看详情</text>
		</view>
		<view class="modle" style="border-bottom:0">
			车辆信息
			<button @tap="addcarsimgs" class="modle_btn">添加信息</button>
		</view>
		<view v-for="(item, index) in carsimgs" :key="index">
			<view class="shangchuan_view_border">
				<view class="shangchuan_view" v-if="item.img!=''">
					<image @tap="upthiscarsimgs" class="shangchuan_Img_close" :data-index="index" src="/static/pages/image/tupiangb_btn.png"></image>
					<image class="shangchuan_Img" :src="item.img"></image>
				</view>
				<view class="shangchuan_view" v-if="item.img==''">
					<image @tap="upcarsimgs" class="shangchuan_Img" :data-index="index" src="/static/pages/image/tianjiantp_btn.png"></image>
				</view>
			</view>
			<view class="car_messageView">
				<input @blur="setthisintro" class="car_messageView_input" :data-index="index" disabled="disabled" placeholderStyle="color: #9295A8;" type="text" :value="item.intro">
				<view @tap="delcarsimgs" class="car_messageView_sc" :data-index="index">删除</view>
			</view>
		</view>
		<view class="modle" style="border-bottom:0">
			车辆视频
			<button @tap="chooseVideo" class="modle_btn">更换视频</button>
		</view>
		<view class="vid_box">
			<video :src="cardetail.video1" controls="true" show-fullscreen-btn="true"></video>
		</view>

		<button class="bufa_btn" :disabled="buttscan" form-type="submit">修改</button>
		<view class="jinggao">发布不真实车源，虚报价格，一经核实将做封号处理。</view>
	</form>
</block>

<!--<import src="/pages/alert/index.wxml"></import>-->
<block data-type="template" data-is="alert" data-attr="isShow:isShow">
    <view class="wx_dialog_container" :hidden="!isShow">
        <view class="wx-alert-mask"></view>
        <view class="wx-alert-dialog">
            <view class="wx-alert-dialog-title">尊敬的用户</view>
            <view class="wx-alert-dialog-content">尚未获取到您的用户信息，较多功能无法体验，请允许获取用户信息</view>
            <view class="wx-alert-dialog-footer">
                <button @tap="hideDialog" class="wx-alert-dialog-btn">拒绝</button>
                <button @getuserinfo="updateUserInfo" class="wx-alert-dialog-btn" open-type="getUserInfo">允许</button>
            </view>
        </view>
    </view>
</block>
</view>
</template>

<script>
var _Page;
function _defineProperty(a, e, t) {
  return e in a ? Object.defineProperty(a, e, {
    value: t,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : a[e] = t, a;
}
var app = getApp(),
    upurl = app.globalData.util.url("entry/wxapp/Api", {
  m: "monai_sharing",
  uid: wx.getStorageSync("uid"),
  r: "Upimg"
});

export default {
  data() {
    return {
      upcarindex: 0,
      vehicletime: "请选择上牌日期",
      vehicletime1: "",
      insurance: "请选择保险到期时间",
      insurance1: "",
      gearboxes: [{
        name: "手自一体",
        id: "1"
      }, {
        name: "手动档",
        id: "2"
      }, {
        name: "自动挡",
        id: "3"
      }],
      gearboxname: "请选择变速箱类型",
      gearboxindex: 0,
      toupimg: !1,
      carsimgs: [],
      delimgs: [],
      dodelimgs: [],
      cardetail: [],
      brandid: "",
      brandname: "",
      classid: "",
      classes: [],
      brands: [],
      selectclass: "请选择分类",
      selectbrand: "请选择品牌",
      selecttime: " 请选择出厂年份",
      selecttime1: "",
      buydate: '',
      userphone: "",
      mapname: "",
      mapx: "",
      mapy: "",
      carimgs: [],
      buttscan: !1,
      textareatype: !1,
      textareaname: "请输入车辆信息介绍",
      textareainput: "",
      isShow: !1,
      showtextarea: !1,
      carInfo: '',
      show_det: 0,
      weburl: '',
      src: '',
      video: '',
      has_invoice: '',
      has_certificate: '',
      selecttime: e[0] + "年" + e[1] + "月",
      selecttime1: a.detail.value,
      date: "",
      buydate1: ""
    };
  },

  components: {},
  props: {},
  onShow: function () {
    var a = this;
    "" != a.brandid && "" != a.brandname && a.setData({
      selectbrand: a.brandname
    });
  },
  onLoad: function (a) {
    var e = this;
    e.setData({
      weburl: app.globalData.imgUrl()
    });
    app.globalData.util.getUserInfo(function (a) {
      a.memberInfo || e.setData({
        isShow: !0
      });
    }), e.firstin(e, a.car);
  },
  methods: {
    showtextareaFun: function () {
      this.setData({
        showtextarea: !this.showtextarea
      });
    },
    textareashow: function (a) {
      this.setData({
        mapname: a.detail.value
      });
    },
    gearbox: function (a) {
      var e = this.gearboxes[a.detail.value];
      e && this.setData({
        gearboxname: e.name,
        gearboxindex: a.detail.value
      });
    },
    bindDateChange: function (a) {
      console.log(a.detail.value);
      var e = a.detail.value.split("-");
      this.setData({
        selecttime: a.detail.value,
        selecttime1: a.detail.value
      });
    },
    bindDateChange1: function (a) {
      console.log(a.detail.value);
      var e = a.detail.value.split("-");
      this.setData({
        buydate: a.detail.value,
        buydate1: a.detail.value
      });
    },
    insuranceFun: function (a) {
      console.log(a.detail.value);
      var e = a.detail.value.split("-");
      this.setData({
        insurance: e[0] + "年" + e[1] + "月" + e[2] + "日",
        insurance1: a.detail.value
      });
    },
    vehicletimeFun: function (a) {
      console.log(a.detail.value);
      var e = a.detail.value.split("-");
      this.setData({
        vehicletime: e[0] + "年" + e[1] + "月" + e[2] + "日",
        vehicletime1: a.detail.value
      });
    },
    firstin: function (t, a) {
      app.globalData.util.request({
        url: "entry/wxapp/Api",
        data: {
          m: "monai_market",
          uid: app.globalData.getuid(),
          car: a,
          r: "sale.salelist.getcardetail"
        },
        cachetime: "0",
        success: function (a) {
          console.log('获取车辆详情：', a.data);
          var e = {
            carsimgs: a.data.data.img,
            cardetail: a.data.data.car,
            carInfo: a.data.data.car,
            src: a.data.data.car.video,
            vehicletime: a.data.data.car.vehicletime,
            insurance: a.data.data.car.insurance,
            gearboxname: t.data.gearboxes[a.data.data.car.gearbox].name,
            gearboxindex: a.data.data.car.gearbox,
            classes: a.data.data.class,
            brandid: a.data.data.car.brand,
            selectbrand: a.data.data.brand.name,
            brandname: a.data.data.brand.name,
            classid: a.data.data.car.class,
            selectclass: a.data.data.classname.name,
            selecttime: a.data.data.car.year,
            selecttime1: a.data.data.car.selecttime1,
            buydate: a.data.data.car.buydate,
            mapx: a.data.data.car.x,
            mapy: a.data.data.car.y,
            textareaname: a.data.data.car.introduce,
            textareainput: a.data.data.car.introduce,
            userphone: a.data.data.car.phone,
            mapname: a.data.data.car.caraddress,
            has_certificate: a.data.data.car.has_certificate,
            has_invoice: a.data.data.car.has_invoice
          };
          t.setData(e);
        }
      });
    },
    intextarea: function () {
      this.setData({
        textareatype: !0,
        textareaname: this.textareainput
      });
    },
    bindblur: function (a) {
      var e = a.detail.value,
          t = e;
      e || (e = "请输入车辆信息介绍", t = ""), this.setData({
        textareatype: !1,
        textareaname: e,
        textareainput: t
      });
    },
    hideDialog: function () {
      this.setData({
        isShow: !this.isShow
      });
    },
    updateUserInfo: function (a) {
      var e = this;
      app.globalData.util.getUserInfo(function (a) {
        wx.setStorageSync("uid", a.memberInfo.uid), e.hideDialog();
      }, a.detail);
    },
    //选择视频
    chooseVideo: function () {
      var that = this;
      wx.chooseVideo({
        success: function (res) {
          console.log(res.tempFilePath);
          that.setData({
            src: res.tempFilePath
          }), that.uploadvideo();
        }
      });
    },
    //选择有无发票
    choose_fp: function () {
      var that = this;

      if (that.has_invoice == 0) {
        that.setData({
          has_invoice: 1
        });
      } else {
        that.setData({
          has_invoice: 0
        });
      }
    },
    //选择有无合格证
    choose_hgz: function () {
      var that = this;

      if (that.has_certificate == 0) {
        that.setData({
          has_certificate: 1
        });
      } else {
        that.setData({
          has_certificate: 0
        });
      }
    },
    //上传视频 目前后台限制最大100M，以后如果视频太大可以在选择视频的时候进行压缩
    uploadvideo: function () {
      var that = this;
      var src = that.src;
      var f = app.globalData.util.url("entry/wxapp/Api", {
        m: "monai_market",
        r: "sale.index.file_upload1"
      });
      wx.uploadFile({
        url: f,
        //服务器接口
        filePath: src,
        //   header: {
        //     'content-type': 'multipart/form-data'
        //   },
        name: 'file',
        //服务器定义的Key值
        success: function (res) {
          console.log('视频上传成功', JSON.parse(res.data)); // that.data.cardetail.video=JSON.parse(res.data).data.url;

          var jsonarr = that.cardetail;
          jsonarr.video = JSON.parse(res.data).data.url;
          jsonarr.video1 = JSON.parse(res.data).data.video;
          that.setData({
            video: JSON.parse(res.data).data,
            cardetail: jsonarr
          });
        },
        fail: function () {
          console.log('接口调用失败');
        }
      });
    },
    //关闭更多机况详情
    canlce_det: function () {
      var that = this;
      console.log(that.carInfo);
      that.setData({
        show_det: 0
      });
    },
    //设置更多机况
    toMore: function () {
      var that = this;
      that.setData({
        show_det: 1
      });
    },
    //获取设置机况数据
    click_item: function (e) {
      var name = e.currentTarget.dataset.name;
      var id = e.currentTarget.dataset.id;
      var that = this; // if(name=='cab_worn'){
      //     that.setData({
      //         cab_worn:parseInt(id)
      //     });
      // }

      var jsonCar = that.carInfo;
      jsonCar[name] = parseInt(id);
      that.carInfo[name] = parseInt(id);
      that.setData({
        carInfo: jsonCar
      });
      console.log(that.carInfo);
    },
    selectclassFun: function (a) {
      var e = this.classes[a.detail.value];
      this.setData({
        selectclass: e.name,
        classid: e.id
      });
    },
    selectbrandFun: function (a) {
      wx.navigateTo({
        url: "/pages/selectscards/index"
      });
    },
    "getPhoneNumber": function (a) {
      var e = this;
      app.globalData.util.request({
        url: "entry/wxapp/Api",
        data: {
          r: "sale.index.userphone",
          m: "monai_market",
          iv: a.detail.iv,
          encryptedData: a.detail.encryptedData
        },
        cachetime: "0",
        success: function (a) {
          e.setData({
            userphone: a.data.data
          });
        }
      });
    },
    "tomap": function () {
      var e = this;
      wx.chooseLocation({
        success: function (a) {
          e.setData({
            mapx: a.latitude,
            mapy: a.longitude,
            mapname: a.address + a.name
          });
        }
      });
    },
    "release": function (a) {
      var e = this,
          t = wx.getStorageSync("uid");

      if (t) {
        e.setData({
          buttscan: !0
        }); // var lab = a.detail.value.labstr.replace(/，/ig, ',');
        // var labarr = lab.split(',');
        // console.log(lab, lab.split(','));

        var i = e.classid; // if ("" == i || "undefined" == i || "请选择车辆类型" == i) return app.util.message({
        //     title: "请选择车辆类型",
        //     type: "error"
        // }), void e.setData({
        //     buttscan: !1
        // });

        var s = e.brandid; // if ("" == s || "undefined" == s || "请选择车辆品牌" == s) return app.util.message({
        //     title: "请选择车辆品牌",
        //     type: "error"
        // }), void e.setData({
        //     buttscan: !1
        // });

        var r = e.selecttime; // if ("请选择生产日期" == r || "undefined" == r || "" == e.data.selecttime1) return app.util.message({
        //     title: "请选择生产日期",
        //     type: "error"
        // }), void e.setData({
        //     buttscan: !1
        // });
        // var n = e.data.vehicletime;
        // if ("请选择出厂年份" == n || "undefined" == n) return app.util.message({
        //     title: "请选择出厂年份",
        //     type: "error"
        // }), void e.setData({
        //     buttscan: !1
        // });
        // var d = e.data.insurance;
        // if ("请选择保险到期时间" == d || "undefined" == d) return app.util.message({
        //     title: "请选择保险到期时间",
        //     type: "error"
        // }), void e.setData({
        //     buttscan: !1
        // });

        var l = a.detail.value.carname;
        if ("" == l || "undefined" == l) return app.globalData.util.message({
          title: "请填写汽车名称",
          type: "error"
        }), void e.setData({
          buttscan: !1
        });
        var worktime = a.detail.value.work_hours; // if ("" == worktime || "undefined" == worktime) return app.util.message({
        //     title: "请填写工作时长",
        //     type: "error"
        // }), void e.setData({
        //     buttscan: !1
        // });

        var wei = a.detail.value.weight; // if ("" == wei || "undefined" == wei) return app.util.message({
        //     title: "请填写重量",
        //     type: "error"
        // }), void e.setData({
        //     buttscan: !1
        // });

        var yea = a.detail.value.agelimit; // if ("" == yea || "undefined" == yea) return app.util.message({
        //     title: "请填写出厂年限",
        //     type: "error"
        // }), void e.setData({
        //     buttscan: !1
        // });
        // var o = a.detail.value.kilometre;
        // if ("" == o || "undefined" == i) return app.util.message({
        //     title: "请填写公里数",
        //     type: "error"
        // }), void e.setData({
        //     buttscan: !1
        // });

        var c = a.detail.value.price;
        if ("" == c || "undefined" == i) return app.globalData.util.message({
          title: "请填写价格",
          type: "error"
        }), void e.setData({
          buttscan: !1
        });
        var u = a.detail.value.exhaust;
        if ("" == u || "undefined" == u) return app.globalData.util.message({
          title: "请填写排气量",
          type: "error"
        }), void e.setData({
          buttscan: !1
        });
        var m = e.gearboxindex;
        if ("" == m || "undefined" == m) return app.globalData.util.message({
          title: "请选择变速箱类型",
          type: "error"
        }), void e.setData({
          buttscan: !1
        });
        var p = a.detail.value.relname;
        if ("" == p || "undefined" == i) return app.globalData.util.message({
          title: "请填写车主姓名",
          type: "error"
        }), void e.setData({
          buttscan: !1
        }); // var g = a.detail.value.watchcar;
        // if ("" == g || "undefined" == g) return app.util.message({
        //     title: "请填写看车地点（如：北京）",
        //     type: "error"
        // }), void e.setData({
        //     buttscan: !1
        // });

        var f = a.detail.value.phone;
        if ("" == f || "undefined" == i) return app.globalData.util.message({
          title: "请填写联系电话，或点击电话授权",
          type: "error"
        }), void e.setData({
          buttscan: !1
        });
        var h = a.detail.value.address;
        if ("" == h || "undefined" == i) return app.globalData.util.message({
          title: "请填写车辆地址",
          type: "error"
        }), void e.setData({
          buttscan: !1
        });
        var v = e.carsimgs;
        if (v.length < 3) return app.globalData.util.message({
          title: "请至少添加3个车辆图文",
          type: "error"
        }), void e.setData({
          buttscan: !1
        });
        var x = a.detail.value.synopsis,
            b = {
          r: "sale.salelist.upsale",
          m: "monai_market",
          id: e.cardetail.id,
          fomid: a.detail.formId,
          uid: t,
          dodelimgs: e.dodelimgs,
          classid: i,
          watchcar: '',
          vehicletime: '',
          exhaust: u,
          insurance: '',
          gearboxindex: m,
          brand: s,
          times: r,
          times1: e.selecttime1,
          kilometre: '',
          price: c,
          carimgs: v,
          username: p,
          phone: f,
          carname: l,
          address: h,
          mapx: e.mapx,
          mapy: e.mapy,
          synopsis: x,
          relname: p,
          // 联系人姓名
          label: '',
          has_certificate: e.has_certificate,
          has_invoice: e.has_invoice,
          // 标签（数组）
          video: e.cardetail.video,
          // 首图视频
          buydate: e.buydate1,
          // 设备购买日期
          work_hours: worktime,
          // 工作时长
          weight: wei,
          //  重量（吨）
          // agelimit: yea,
          // // 出厂年限
          cab_worn: e.carInfo.cab_worn,
          // 驾驶室 是否有碰撞   0无 ，1轻微 ，2有
          ele_gac: e.carInfo.ele_gac,
          // 电动油门 是否正常 0是（正常）， 1否
          enginewaste_on: e.carInfo.enginewaste_on,
          // 发动机是否有废气（上排气）	0无 ，1轻微 ，2有	
          enginewaste_down: e.carInfo.enginewaste_down,
          // 发动机是否有废气（下排气）	0无 ，1轻微 ，2有	
          fallarm_b: e.carInfo.fallarm_b,
          // 掉臂情况（大臂）0无 ，1轻微 ，2有
          fallarm_s: e.carInfo.fallarm_s,
          // 掉臂情况（小臂）0无 ，1轻微 ，2有
          fallarm_c: e.carInfo.fallarm_c,
          // 掉臂情况（铲斗）0无 ，1轻微 ，2有
          tablegap_sx: e.carInfo.tablegap_sx,
          // 转盘间隙情况（上下）0无 ，1轻微 ，2有
          tablegap_zy: e.carInfo.tablegap_zy,
          // 转盘间隙情况（左右）0无 ，1轻微 ，2有
          brace_car: e.carInfo.brace_car,
          // 怠速撑车情况 0正常 ，1撑不完全 ，2撑不起
          onewalk_z: e.carInfo.onewalk_z,
          // 单边行走情况（左边）0正常 ，1慢 ，2走不动
          onewalk_y: e.carInfo.onewalk_y,
          // 单边行走情况（右边）0正常 ，1慢 ，2走不动
          walkslow_z: e.carInfo.walkslow_z,
          // 行走时减速是否有异响（左边） 0无 ， 1有
          walkslow_y: e.carInfo.walkslow_y,
          // 行走时减速是否有异响（右边） 0无 ， 1有
          idling_holdcar: e.carInfo.idling_holdcar,
          // 怠速憋车情况 0正常 ，1有烟 ，2熄火
          holdsmoke_b: e.carInfo.holdsmoke_b,
          // 憋车发动机烟量（大油门）	0正常 ，1量小 ，2量大
          holdsmoke_s: e.carInfo.holdsmoke_s,
          // 憋车发动机烟量（小油门）	0正常 ，1量小 ，2量大
          device_speed: e.carInfo.device_speed,
          // 设备速度情况  0快 ，1慢 ，2无动作
          crack_b: e.carInfo.crack_b,
          // 开裂情况（大臂） 0无 ， 1有
          crack_s: e.carInfo.crack_s,
          // 开裂情况（小臂） 0无 ， 1有
          crack_c: e.carInfo.crack_c,
          // 开裂情况（铲斗） 0无 ， 1有
          runbig_fdj: e.carInfo.runbig_fdj,
          // 设备运行大件是否有异响（发动机）	0无 ， 1有
          runbig_zf: e.carInfo.runbig_zf,
          // 设备运行大件是否有异响（主阀）		0无 ， 1有
          runbig_hzmd: e.carInfo.runbig_hzmd,
          // 设备运行大件是否有异响（回转马达）	0无 ， 1有
          chain_z: e.carInfo.chain_z,
          // 链轨链桶情况（左连接） 0无 ， 1有
          chain_y: e.carInfo.chain_y,
          // 链轨链桶情况（右连接） 0无 ， 1有
          x_frame: e.carInfo.x_frame,
          // x架情况	0正常 ，1有开裂 ，2需更换
          mace: e.carInfo.mace,
          // 锤及管路（锤） 0带 ，1需拆 ，2无
          tube: e.carInfo.tube,
          // 锤及管路（管路） 0带 ，1需拆 ，2无
          routine_fp: e.carInfo.routine_fp,
          // 手续情况（发票） 0无 ， 1有
          routine_hgz: e.carInfo.routine_hgz // 手续情况（合格证） 0无 ， 1有

        };
        app.globalData.util.request({
          url: "entry/wxapp/Api",
          data: b,
          cachetime: "0",
          success: function (a) {
            a && a.data && 405 == a.data.message ? e.setData({
              isShow: !0,
              buttscan: !1
            }) : (e.delallimgs(), wx.showModal({
              content: a.data.message,
              success: function () {
                wx.navigateBack({});
              }
            }));
          },
          fail: function (a) {
            wx.showModal({
              content: a.data.message,
              success: function () {
                wx.navigateBack({});
              }
            }), e.setData({
              buttscan: !1
            });
          }
        });
      } else e.setData({
        isShow: !0
      });
    },
    "upnotice": function (a) {
      this.noticeindex = a.detail.current;
    },
    "retonotice": function () {
      var a = this.notice[this.noticeindex];
      a && a.id && wx.navigateTo({
        url: "/pages/index/index?id=" + a.id
      });
    },
    "delallimgs": function () {
      var a = this.delimgs,
          e = this.dodelimgs;
      if (console.log(a), console.log(e), a && 1 < a.length) for (var t in a) a[t] && this.delthisimg(a[t]);
      if (e && 1 < e.length) for (var i in e) e[i] && e[i].img && this.delthisimg(e[i].img);
    },
    "delcarsimgs": function (a) {
      var e = this,
          t = a.currentTarget.dataset.index,
          i = e.carsimgs;

      if (0 == t && 1 < i.length && ("" != i[t].img || "" != i[t].intro)) {
        var s;
        if ("new" == i[t].id && "" != i[t].img) e.delthisimg(i[t].img);else (s = e.dodelimgs).push(i[t]), e.dodelimgs = s, console.log(s);
        return i.splice(t, 1), void e.setData({
          carsimgs: i
        });
      }

      0 != t && ((s = e.dodelimgs).push(i[t]), e.dodelimgs = s, console.log(s), i.splice(t, 1), e.setData({
        carsimgs: i
      }));
    },
    "upcarsimgs": function (a) {
      var e = this,
          t = a.currentTarget.dataset.index;
      9 <= e.carsimgs.length ? app.globalData.util.message({
        title: "您添加的图文已经很多了",
        type: "error"
      }) : (e.upcarindex = t, app.globalData.upimgs({
        scannums: 1,
        filename: "cars",
        success: function (a) {
          e.addinimgs(a[0]);
        }
      }));
    },
    "addinimgs": function (a) {
      var e = this.carsimgs,
          t = this.upcarindex;
      e[t].img = a.all, e[t].imgshort = a.short, this.setData({
        carsimgs: e
      });
    },
    "upthiscarsimgs": function (a) {
      var e = a.currentTarget.dataset.index,
          t = this.carsimgs,
          i = this.delimgs;
      i.push(t[e].img), this.delimgs = i, console.log(i), t[e].img = "", this.setData({
        carsimgs: t
      });
    },
    "setthisintro": function (a) {
      var e = a.currentTarget.dataset.index;
      this.carsimgs[e].intro = a.detail.value;
    },
    "addcarsimgs": function () {
      var a = this.carsimgs;
      a.push({
        img: "",
        intro: "",
        imgshort: "",
        id: "new"
      }), this.setData({
        carsimgs: a
      });
    },
    "delthisimg": function (a) {
      app.globalData.util.request({
        url: "entry/wxapp/Api",
        data: {
          m: "monai_sharing",
          uid: app.globalData.getuid(),
          imgurl: a,
          r: "Upimg.delImg"
        }
      });
    },
    "onReady": function () {},
    "onHide": function () {},
    "onUnload": function () {},
    "onPullDownRefresh": function () {},
    "onReachBottom": function () {},
    "onShareAppMessage": function () {},

    formReset() {
      console.log("占位：函数 formReset 未声明");
    }

  }
};
</script>
<style>
@import "./index.css";
</style>